﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title>HTML Entities</title>
	<style type="text/css">
		body { margin: 0; padding: 0; font-size: small; color: #000; background: #fff; text-align: center; }
		body { /* adjustment for IE5 */ font-size: x-small; /* IE5 Win */ voice-family: "\"}\""; voice-family: inherit; font-size: small; }
		html > body { /* be nice to Opera */ font-size: small; }
		#container { min-width:780px; margin: 0 40px; text-align: left; }
		#container h1 { color: #333; font-size: 250%; border-bottom: double 3px #664; text-align:center; }
		#container h2 { color: #06f; font-size: 120%; margin-left:10px; padding:0; margin:0; }
		.entityclip { padding:0 10px; margin:0 auto 20px; }
		.entityclip ul { padding:0; margin:0; }
		.entityclip ul li { display: block; float: left; line-height: 30px; font-family: "Courier New"; font-size: 20px; list-style-type: none; cursor: pointer; border: 1px solid #ccc; margin: 1px; text-align: center; width: 30px; height: 30px; vertical-align: middle; }
		.entityclip ul li:hover { background:#06f; }
		dl,dt,dd { display:block; clear:both; }
		dt { font-weight:bold; }
		dd { margin-left:100px; }
		dd a,dd span { display: block; float:left; width:50px; }
	</style>
</head>
<body>
	<div id="container">
		<h1>HTML Entities</h1>
		<h2>常用</h2>
		<div class="entityclip">
			<ul><li onclick="alert('&amp;amp;')">&amp;</li>
				<li onclick="alert('&amp;quot;')">&quot;</li>
				<li onclick="alert('&amp;lt;')">&lt;</li>
				<li onclick="alert('&amp;gt;')">&gt;</li>
				<li onclick="alert('&amp;nbsp;')">&nbsp;</li>
				<li onclick="alert('&amp;copy;')">&copy;</li>
				<li onclick="alert('&amp;reg;')">&reg;</li>
			</ul>
			<div style="clear:both;"></div>
		</div>
		<h2>&amp;&#35;1; 到 &amp;&#35;400;</h2>
		<div class="entityclip">
			<ul><script language="javascript" type="text/javascript">
			    	for (var i = 1; i <= 400; i++) {
			    		document.write("<li onclick=\"alert('&amp;&#35;" + i + ";');\" title=\"ASCII " + i + " [&amp;#" + i +";]\">&#" + i + ";</li>");
			    	}
				</script>
			</ul>
			<div style="clear:both;"></div>
		</div>
		<h2>汉字</h2>
		<div class="entityclip">
			<dl><dt>HTML:</dt>
				<dd><span>天</span><span>啊</span><span>不</span><span>会</span><span>吧</span></dd>
				<dd><span>&#22825;</span><span>&#21834;</span><span>&#19981;</span><span>&#20250;</span><span>&#21543;</span></dd></dl>
			<dl><dt>Javascript:</dt>
				<dd><a href="javascript:alert('天'.charCodeAt(0));">天</a>
					<a href="javascript:alert('啊'.charCodeAt(0));">啊</a>
					<a href="javascript:alert('不'.charCodeAt(0));">不</a>
					<a href="javascript:alert('会'.charCodeAt(0));">会</a>
					<a href="javascript:alert('吧'.charCodeAt(0));">吧</a></dd>
				<dd><a href="javascript:alert(String.fromCharCode(22825));">22825</a>
					<a href="javascript:alert(String.fromCharCode(21834));">21834</a>
					<a href="javascript:alert(String.fromCharCode(19981));">19981</a>
					<a href="javascript:alert(String.fromCharCode(20250));">20250</a>
					<a href="javascript:alert(String.fromCharCode(21543));">21543</a></dd></dl>
			<dl><dt>VBScript:</dt>
				<dd><a href="javascript:void(0);" onclick='vbscript:msgbox(ascw("天"))'>天</a>
					<a href="javascript:void(0);" onclick='vbscript:msgbox(ascw("啊"))'>啊</a>
					<a href="javascript:void(0);" onclick='vbscript:msgbox(ascw("不"))'>不</a>
					<a href="javascript:void(0);" onclick='vbscript:msgbox(ascw("会"))'>会</a>
					<a href="javascript:void(0);" onclick='vbscript:msgbox(ascw("吧"))'>吧</a></dd>
				<dd><a href="javascript:void(0);" onclick='vbscript:msgbox(chrw(22825))'>22825</a>
					<a href="javascript:void(0);" onclick='vbscript:msgbox(chrw(21834))'>21834</a>
					<a href="javascript:void(0);" onclick='vbscript:msgbox(chrw(19981))'>19981</a>
					<a href="javascript:void(0);" onclick='vbscript:msgbox(chrw(20250))'>20250</a>
					<a href="javascript:void(0);" onclick='vbscript:msgbox(chrw(21543))'>21543</a></dd></dl>
			<div style="clear:both; padding-top:10px;"><label for="t">请输入字符:</label><input type="text" id="t" name="t" /><input type="button" onclick="var tv=document.getElementById('t').value;if(tv.length>0){alert(tv.charCodeAt(0));}" value="查看Code" /></div>	
		</div>
	</div>
</body>
</html>
